package com.lvmama.task.service.dao;


import com.lvmama.task.common.dao.BaseIbatisDAO;
import com.lvmama.task.common.vo.TaskTick;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.<p/>
 * User: troy-kou<p/>
 * Date: 14-1-3<p/>
 * Time: 上午10:59<p/>
 * Email:kouhongyu@163.com<p/>
 */
public class TaskTickDAO extends BaseIbatisDAO {

    public Long insertTaskTick(TaskTick taskTick) {
        return (Long) super.insert("TASK_TICK.insertTaskTick", taskTick);
    }

    public int updateTaskTick(TaskTick taskTick) {
        return super.update("TASK_TICK.updateTaskTick", taskTick);
    }

    public List<TaskTick> getTaskTickList(Map<String, Object> paramMap) {
        return super.queryForListForReport("TASK_TICK.selectTaskTickList", paramMap);
    }

    public TaskTick getTaskTick(Long tickId) {
        return (TaskTick) super.queryForObject("TASK_TICK.selectTaskTick", tickId);
    }

    public TaskTick getTaskTickByNodeOwner(Map<String,Object> param) {
        return (TaskTick) super.queryForObject("TASK_TICK.selectTaskTickByNode", param);
    }

    public int clearInactiveNode(Map<String,Object> param) {
        return super.update("TASK_TICK.clearInactiveNode", param);
    }

    public int clearDieThreadNode(Map<String,Object> param) {
        return super.update("TASK_TICK.clearDieThreadNode", param);
    }
}
